The present invention relates to methods for assigning regions in a storage in a data processor and, more particularly, to a method for logically dividing a storage into a plurality of storage regions and for suitably assigning the divided storage regions to a plurality of virtual machines to realize a plurality of virtual machines with use of a data processor.
For the purpose of operating a plurality of operating systems (OSs) on a single data processor, in general, there is used a virtual machine (VM) or a system known as a logical partition (LPAR) system. In order to implement a plurality of virtual machines (VMs) on a single data processor, a program called a virtual machine control program (VMCP) is run on a real data processor to generate the plurality of VMs under control of the VMCP and to operate the OSs of the VMs independently on their VMs. Accordingly, the VMCP has an additional function of causing the VMs to sharedly use hardware resources of the single real data processor.
As a method for enabling the VMs to sharedly use the hardware resources of the single real data processor, it has been proposed to divide a real storage into logical regions which are exclusively assigned to the respective VMs.
FIG. 1a shows an example of parameters which are designated by an operator to divide a real storage into logical regions. More specifically, LPAR1, LPAR2 and LPAR3 designate logical partitions allocated to respective VMs to be operated. In FIG. 1a, a parameter STO is indicative of a storage origin, a parameter STE is indicative of an initial storage extent and a parameter STR is indicative of a reserved storage extent. These parameters can be designated respectively for the different LPARs. The parameter STO designates the start address of one of the regions of the actual storage assigned to the associated logical partition LPAR. When the parameter STO is not designated, an uppermost address (63 in FIG. 1b) of the storage regions which is not being used currently on the real storage is assigned to the start address under the program VMCP. The parameter STE designates the storage extent of the initial storage region to be assigned to the associated LPAR. The parameter STR designates the reserved storage extent to be assigned to the associated LPAR. The reserved storage region is assigned to the associated LPAR or is removed under control of storage-region on-line and off-line demand instructions issued from one of the OSs operated in the initial storage region.
Shown in FIGS. 1b and 1c are examples of the storage region assignment to the respective LPARs of the real storage, when the partitions LPAR1, LPAR2 and LPAR3 given by all such three sorts of predetermined parameters as shown in FIG. 1a are activated, respectively. In this case, to "activate" means that, with respect to either one of the LPARs given in FIG. 1a, the storage region of the associated VM or LPAR is put in its usable condition. More in detail, FIG. 1b shows an example in which the regions LPAR1, LPAR2 and LPAR3 are activated in this order and the storage regions are assigned to all the LPARs. Meanwhile., FIG. 1c shows an example in which the regions LPAR1, LPAR3 and LPAR2 are activated in this order. In the case of FIG. 1c, the LPAR1 and LPAR3 are successfully assigned and the STO is not assigned to both of the LPAR1 and LPAR3, so that the assigned storage regions are reserved in the upper part of the real storage as shown. Thereafter, when an attempt is made to activate the LPAR2, the STO is designated for the LPAR2, for which reason the system tries to secure a storage region starting with the STO. However, since part of the storage region to be secured is already assigned to the LPAR3, its activation ends in a failure.
As already explained above, according to the method for assigning the regions of the storage to the respective LPARs (VMs), successful or unsuccessful assignment depends on the activating order of the respective LPARs. This problem cannot be ignored from the viewpoint of improving the operability of the system. Further, the prior art assignment method has another problem in that, in spite of the fact that a remainder of the storage extent of the LPAR to be activated is present in the real storage, the remainder storage extent cannot be used.